// 获取当前日期/格式化指定日期
export function getDateFun(num) {
      // var d = new Date(num ? num : new Date())
      // var y = d.getFullYear()
      // var m = d.getMonth() + 1 < 10 ? `0${d.getMonth() + 1}` : d.getMonth() + 1
      // var day = d.getDate() < 10 ? `0${d.getDate() + 1}` : d.getDate()
      // return `${y}-${m}-${day}`
    var date = new Date(num ? num : new Date());
    var myyear = date.getFullYear();
    var mymonth = date.getMonth() + 1;
    var myweekday = date.getDate();
 
    if (mymonth < 10) {
        mymonth = "0" + mymonth;
    }
    if (myweekday < 10) {
        myweekday = "0" + myweekday;
    }
    return (myyear + "-" + mymonth + "-" + myweekday);//想要什么格式都可以随便自己拼
}